// Have include guard.
#ifndef COMPOUNDSTATE_H
#define COMPOUNDSTATE_H

// Include files.
#include "State.hpp"
#include "InstantState.hpp"

/**
 *  The ChainState is a chain of state compound into one state.
 *  
 *  Testing seems to show that this class works.
 */
class ChainState :
	public State
{
	public:
		ChainState();
		void AppendState(State &state);
	protected:
		virtual void InitializeImpl();
	private:
		InstantState m_stateSuccess;
		InstantState m_stateError;
		State *m_stateInital;
		State *m_stateLastAppended;
};

#endif // #ifndef COMPOUNDSTATE_H 
